package com.icinfo.cloud.provider.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.util.ObjectUtils;

/**
 * 描述：文书种类枚举
 *
 * @author shishengyao
 * @description
 * @date 2022/5/28
 */
@AllArgsConstructor
public enum DocumentKindEnum {


    /**
     * 文书种类枚举
     */
    DOC_KIND_BYCFJDS("BYCFJDS", "不予处罚决定书"),
    DOC_KIND_BYCFJDSPB("BYCFJDSPB", "不予处罚决定审批表"),
    DOC_KIND_CFGZS("CFGZS", "处罚告知书"),
    DOC_KIND_CFGZSPB("CFGZSPB", "处罚告知审批表"),
    DOC_KIND_CFGZSTZL("CFGZSTZL", "处罚（听证类）告知书"),
    DOC_KIND_CFJDS("CFJDS", "行政处罚决定书"),
    DOC_KIND_CFJDSPB("CFJDSPB", "行政处罚决定审批表"),
    DOC_KIND_CQYQSQB("CQYQSQB", "呈请延期审批表"),
    DOC_KIND_CQZZQZZXSQB("CQZZQZZXSQB", "呈请中止强制执行审批表"),
    DOC_KIND_CXLASQB("CXLASQB", "撤销立案审批表"),
    DOC_KIND_CYQZTZS("CYQZTZS", "抽样取证通知书"),
    DOC_KIND_CYQZWPCLTZS("CYQZWPCLTZS", "抽样取证物品处理通知书"),
    DOC_KIND_GZSHZ("GZSHZ", "告知书回执"),
    DOC_KIND_JABG("JABG", "案件结案报告"),
    DOC_KIND_JCXXDJBCZJTZS("JCXXDJBCZJTZS", "解除先行登记保存证据通知书"),
    DOC_KIND_JDYJGZS("JDYJGZS", "鉴定意见告知书"),
    DOC_KIND_JTYA("JTYA", "集体议案"),
    DOC_KIND_LASPB("LASPB", "立案审批表"),
    DOC_KIND_QZZXSQS("QZZXSQS", "强制执行申请书"),
    DOC_KIND_SDDZQRS("SDDZQRS", "送达方式及地址确认书"),
    DOC_KIND_SDHZ("SDHZ", "送达回证"),
    DOC_KIND_SQWTS("SQWTS", "委托授权书"),
    DOC_KIND_XWTZS("XWTZS", "询问通知书"),
    DOC_KIND_XZDJBCZJTZS("XZDJBCZJTZS", "先行登记保存证据通知书"),
    DOC_KIND_XZJDLXCGS("XZJDLXCGS", "行政决定履行催告书"),
    DOC_KIND_XZCFCXSPB("XZCFCXSPB", "行政处罚撤销审批表"),
    DOC_KIND_XZCFCXJDS("XZCFCXJDS", "行政处罚撤销决定书"),
    DOC_KIND_ZJBG("ZJBG", "案件调查终结报告"),
    DOC_KIND_ZLGZTZS("ZLGZTZS", "责令改正通知书"),
    DOC_KIND_ZLTZWFXWJDS("ZLTZWFXWJDS", "责令停止违法行为决定书"),
    DOC_KIND_ZLTZWFXWTZS("ZLTZWFXWTZS", "责令停止违法行为通知书"),
    DOC_KIND_ZXQKHCJL("ZXQKHCJL", "执行情况核查记录"),
    DOC_KIND_ZZSQB("ZZSQB", "终止审批表"),
    DOC_KIND_JYCXCFJDS("JYCXCFJDS", "简易程序处罚决定书"),
    DOC_KIND_JYCXGAWTCFJDS("JYCXGAWTCFJDS", "简易程序公安委托执法处罚决定书"),
    DOC_KIND_DK2FQCSSBSM("DK2FQCSSBSM", "放弃陈述、申辩声明"),
    DOC_KIND_XCZPJSM("XCZPJSM", "现场照片及说明"),
    DOC_KIND_DK2CSSBBL("DK2CSSBBL", "陈述申辩笔录"),
    DOC_KIND_DK1BYLASPB("DT2BYLASPB", "不予立案"),
    DOC_KIND_DK2AYYSH("DK2AYYSH", "案源移送函"),
    DOC_KIND_DK1AJLYDJB("DK1AJLYDJB", "案件来源登记表"),
    DOC_KIND_DK2CFKYJDS("DK2CFKYJDS", "查封（扣押）决定书"),
    DOC_KIND_DK1SXFZAJYSSPB("DK1SXFZAJYSSPB", "涉嫌犯罪案件移送审批表"),
    DOC_KIND_DK2SXFZAJYSS("DK2SXFZAJYSS", "涉嫌犯罪案件移送书"),
    DOC_KIND_DT1SQGZGSSPB("DT1SQGZGSSPB", "申请更正公示审批表"),
    DOC_KIND_DT1SQCXGSSPB("DT1SQCXGSSPB", "申请撤销公示审批表"),
    DOC_KIND_DK2TYFQYQJNFKTZS("DK2TYFQYQJNFKTZS", "同意分期（延期）缴纳罚款通知书"),
    DOC_KIND_DK1TYFQYQJNFKSPB("DK1TYFQYQJNFKSPB", "同意分期（延期）缴纳罚款审批表"),
    DOC_KIND_DK2WFAJSLJL("DK2WFAJSLJL", "违法案件审理记录"),
    DOC_KIND_DK2SJCXGZS("DK2SJCXGZS","速结程序有关事项知情同意书"),
    DOC_KIND_DK2XWBL("DK2XWBL","询问笔录"),
    DOC_KIND_DK2XCKYT("DK2XCKYT","现场勘验图"),
    /*现场勘验（检查）笔录*/
    DOC_KIND_DK2XCKYJCBL("DK2XCKYJCBL","现场勘验（检查）笔录"),
    DOC_KIND_DK2BYXZCFGZS("DK2BYXZCFGZS","不予行政处罚告知书"),
    DOC_KIND_DK1BZGZSPB("DK1BZGZSPB","补正/更正审批表"),
    DOC_KIND_DK2BZGZTZS("DK2BZGZTZS","补正/更正通知书"),
    DOC_KIND_DK1TZDSRNBSPB("DK1TZDSRNBSPB","调整当事人内部审批表"),
    DOC_KIND_DK1AJCLYJS("DK1AJCLYJS","案件处理意见书"),
    DOC_KIND_DK1AJDCZJBGSPB("DK1AJDCZJBGSPB","案件调查终结报告审批表"),
    DOC_KIND_DK1CSSBFHYJS("DK1CSSBFHYJS","陈述申辩复核意见书"),
    DOC_KIND_DK2JAKBTZS("DK2JAKBTZS","简案快办通知书"),
    DOC_KIND_DK2SFZM("DK2SFZM", "身份证明"),
    DOC_KIND_DK2XCSYT("DK2XCSYT", "现场示意图"),
    DOC_KIND_DK2KYBL("DK2KYBL", "勘验笔录"),
    DOC_KIND_DK2XCZP("DK2XCZP", "现场照片及说明"),
    DOC_KIND_DK1BYCFGZSPB("DK1BYCFGZSPB", "不予处罚告知审批表"),
    DOC_KIND_DK2ZLXQGZJDS("DK2ZLXQGZJDS", "责令限期改正决定书"),
    DOC_KIND_CLGZSPB("CLGZSPB", "处理告知审批表"),
    DOC_KIND_CLJDSPB("CLJDSPB", "处理决定审批表"),
    DOC_KIND_XYXFGZS("XYXFGZS", "信用修复告知书"),
    DOC_KIND_DK2JAKBGZS("DK2JAKBGZS","简案快办告知书"),
    DOC_KIND_DK2QTWS("DK2QTWS","其他"),
    DOC_KIND_ZLGZQKFCJL("ZLGZQKFCJL","责令改正情况复查记录"),
    DOC_KIND_FSSRJKD("FSSRJKD","非税收入缴款单"),
    DOC_KIND_DK1JCFKJMSPB("DK1JCFKJMSPB","减免加处罚款审批表");

    /**
     * 编码
     */
    @Getter
    private String code;
    /**
     * 描述
     */
    @Getter
    private String des;

    /**
     * 描述：根据code获取value
     *
     * @param code 编码
     * @return 描述内容
     * @author xiangyuyu
     * @date 2022-02-22 10:43
     */
    public static String getValueByCode(String code) {
        if (ObjectUtils.isEmpty(code)) {
            return null;
        }
        for (DocumentKindEnum e : DocumentKindEnum.values()) {
            if (code.equals(e.getCode())) {
                return e.getDes();
            }
        }
        return null;
    }

    /**
     * 描述：校验code是否是合法枚举
     *
     * @param code 枚举code
     * @return boolean 是否合法枚举（true-是/false-否）
     * @author xiangyuyu
     * @date 2022-02-22 10:42
     */
    public static boolean isLegalEnumCode(String code) {
        boolean flag = false;
        for (DocumentKindEnum e : DocumentKindEnum.values()) {
            if (e.getCode().equalsIgnoreCase(code)) {
                flag = true;
                break;
            }
        }
        return flag;
    }
}
